
export default class Client {
  constructor(){

    let instance = null;

    switch (true) {
      case this.isApp() :{
        instance = new App();
        break ;
      }

      case this.isWeChat() :{
        instance = new WeChat();
        break ;
      }

      case this.isAlipay() :{
        instance = new Alipay();
        break ;
      }

      default : {
        instance = new Browser();
        break ;
      }
    }




    return instance;

  }





  isApp(){


    return false;
  }

  isWeChat(){

    return false;
  }

  isAlipay(){

    return false;
  }



}






class Browser extends Client{

}


class App extends Client{

}




class WeChat extends Client{

}





class Alipay extends Client{

}
